/*
 * Created on 2006-7-5
 */
package entity;

public class Statistics {
	public int CanResultMsgCounter = 0;
	public int probeMsgCounter = 0;
	public int updateMsgCounter = 0;
	public long serverWorkLoad = 0;
	public long clientWorklod = 0;
	
	// public int numO2sMessages;

	// public int numS2oMessages;

	// public int getTotalMsgs() {
	// return numO2sMessages + numS2oMessages;
	// }

	public double getCanResultMsgRate(int numTimeSteps) {
		return (double) this.CanResultMsgCounter / numTimeSteps;
	}

	public double getProbeMsgRate(int numTimeSteps) {
		return (double) this.probeMsgCounter / numTimeSteps;
	}

	public double getServerWorkLoadSec() {
		return this.serverWorkLoad / 1000.0;
	}

	public double getClientWorkLoadSec(int numClients) {
		
		return this.serverWorkLoad / 1000.0/numClients;
	}

	public double getUpdateMsgRate(int numTimePoints, int numClients) {
		return (double) this.updateMsgCounter / numTimePoints / numClients;
	}

}
